package AdapterPattern.ObjectAdapter;


public class Test {
    public static void main(String[] args) {
        //类适配器测试
        System.out.println("适配器模式 2.对象适配器测试");
        Phone phone = new Phone();
        phone.charging(new ObjectAdapter(new VoltageSrc()));//传入适配器，其构造函数传入被适配类的实例
    }
}
